package com.mmy.fta.usercenter.repository;

import com.mmy.fta.usercenter.entity.DriverMembershipEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface DriverMembershipEntityMapper {
    int insert(DriverMembershipEntity record);

    int insertSelective(DriverMembershipEntity record);

    DriverMembershipEntity selectByPrimaryKey(Long id);

    DriverMembershipEntity selectByOpenId(String openId);

    int updateByPrimaryKeySelective(DriverMembershipEntity record);

    int updateByPrimaryKey(DriverMembershipEntity record);

    int insertNewDriverMember(DriverMembershipEntity driverMembershipEntity);

    int selectDriverMemberShipType(String openId);

    int updateDriverMember(DriverMembershipEntity driverMembershipEntity);

    int updateNormalMemberShipTime(String openId);

    int updateOilMemberShipTime(String openId);

    int updateColdMemberShipTime(String openId);

    int updateDriverNormalMember(DriverMembershipEntity driverMembershipEntity);

    int updateDriverOilMember(DriverMembershipEntity driverMembershipEntity);

    int updateDriverColdMember(DriverMembershipEntity driverMembershipEntity);


    boolean ColdMembership();

    int updateNormalMemberShipStatus(@Param("openId")String openId, @Param("times")int times);

    int updateNormalMemberShipStatus(String openId);

    int addDriverMembershipMonthMileage(@Param("driverOpenId") String driverOpenId, @Param("mileage") Integer mileage);

    int descDriverMemberFreeTime(String openId);

    DriverMembershipEntity selectDriverMemberByOpenId(String openId);
}